/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Caps
 */
@Embeddable
public class DiretorCentroPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "str_codigo")
    private String strCodigo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "pssfsc_codigo")
    private int pssfscCodigo;

    public DiretorCentroPK() {
    }

    public DiretorCentroPK(String strCodigo, int pssfscCodigo) {
        this.strCodigo = strCodigo;
        this.pssfscCodigo = pssfscCodigo;
    }

    public String getStrCodigo() {
        return strCodigo;
    }

    public void setStrCodigo(String strCodigo) {
        this.strCodigo = strCodigo;
    }

    public int getPssfscCodigo() {
        return pssfscCodigo;
    }

    public void setPssfscCodigo(int pssfscCodigo) {
        this.pssfscCodigo = pssfscCodigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (strCodigo != null ? strCodigo.hashCode() : 0);
        hash += (int) pssfscCodigo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DiretorCentroPK)) {
            return false;
        }
        DiretorCentroPK other = (DiretorCentroPK) object;
        if ((this.strCodigo == null && other.strCodigo != null) || (this.strCodigo != null && !this.strCodigo.equals(other.strCodigo))) {
            return false;
        }
        if (this.pssfscCodigo != other.pssfscCodigo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.DiretorCentroPK[ strCodigo=" + strCodigo + ", pssfscCodigo=" + pssfscCodigo + " ]";
    }
    
}
